import 'package:dk_flutter_base/dk_ui.dart';

class PasswordStatelessWidget extends StatelessWidget {
  final String firstName;
  final String secondName;
  final String tipName;
  final VoidCallback tapAction;
  final BuildContext context;
  PasswordStatelessWidget(
      {this.firstName = "", this.secondName = "", this.tipName = "",this.tapAction,this.context});
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    List<Widget> list = List();
    //第一行
    list.add(Padding(
      padding: EdgeInsets.only(top: 32, left: 23, right: 23, bottom: 16),
      child: Text(
        this.firstName,
        style: TextStyle(fontSize: 14, color: Color(0xFF333333)),
      ),
    ));
    Divider divider = Divider(height: 0.5, color: Color(0xffDBDBDB), indent: 15,endIndent: 15,);
    list.add(divider);

    //第二行
    list.add(Padding(
      padding: EdgeInsets.only(top: 17, left: 10, right: 10, bottom: 17),
      child: Text(
        this.secondName,
        style: TextStyle(fontSize: 14, color: Color(0xFF333333)),
      ),
    ));
    list.add(divider);

    //提示文字
    list.add(
      Padding(
        padding: const EdgeInsets.only(top: 30,bottom: 25),
        child: GestureDetector(
          onTap: (){
            Navigator.pop(context);
            this.tapAction();
          },
          child: Container(
            alignment: Alignment.center,
            height: 36,
            width: 140,
            child: Text(
              this.tipName,
              style: TextStyle(fontSize: 14, color: Color(0xFF3DBCC6)),
            ),
            decoration: BoxDecoration(
              borderRadius:BorderRadius.circular(18) ,
              border: Border.all(width: 0.5,color: Color(0xFF3DBCC6))
            ),
          ),
        ),
      )
    );

    return Container(
      margin: EdgeInsets.all(39),
      child: Material(
        color: Colors.white,
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(15.0),
        ),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: list,
        ),
      ),
    );
  }
}
